package com.mjf.common.utils;

import com.mjf.common.utils.ResponseCode;
import lombok.Data;

/**
 * @author chenshoumeng
 */
@Data
public class ResponseVO<T> {

    /**
     * status code
     */
    private Integer code;

    /**
     * response msg
     */
    private String message;

    private Boolean success;

    /**
     * data object
     */
    private T data;

    public ResponseVO(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
        this.success = ResponseCode.RESPONSE_RETURN_CODE_SUCCESS.getCode().equals(code);
    }

}
